package com.pearl.boot.util;

import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

/**
 * @author TangDan
 * @version 1.0
 * @since 2022/7/13
 */
public class EnvironmentUtils implements EnvironmentAware {

    private static Environment environment;

    @Override
    public void setEnvironment(Environment environment) {
        EnvironmentUtils.environment = environment;
    }

    public static Environment getEnvironment() {
        return environment;
    }
}
